Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for login before pulling from cache, resolving fatal errors #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Check for login before pulling from cache, resolving fatal errors #93

wants to merge 1 commit into from

Conversation

jrgp
Copy link

@jrgp jrgp commented Feb 19, 2015

Currently, if login fails and you try getSnaps() or any of the
other get functions, it will call getUpdates() which calls
$this->cache->get() before checking for a valid login.

As $this->cache is not populated until a valid login, this will
cause this sort of error:

Fatal error: Call to a member function get() on a non-object in /homepages/15/d419114431/htdocs/bobink/snapchat/src/snapchat.php on line 234

This change modifies the code to perform the login check before
pulling from cache, solving the fatal errors.

Currently, if login fails and you try getSnaps() or any of the
other get functions, it will call getUpdates() which calls
$this->cache->get() before checking for a valid login.

As $this->cache is not populated until a valid login, this will
cause this sort of error:

Fatal error: Call to a member function get() on a non-object in /homepages/15/d419114431/htdocs/bobink/snapchat/src/snapchat.php on line 234

This change modifies the code to perform the login check before
pulling from cache, solving the fatal errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant